🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / feature / messaging / src / commonMain / kotlin / org / meshtastic / feature / messaging / QuickChatViewModel.kt
Displaying Raw • Download
feature/messaging/src/commonMain/kotlin/org/meshtastic/feature/messaging/QuickChatViewModel.kt renovate/net.java.dev.jna-jna-5.x (5a8f4966) Text, 2.02 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.messaging
Tff7b72import T7ee787androidx.lifecycle.ViewModel
Tff7b72import T7ee787org.koin.core.annotation.KoinViewModel
Tff7b72import T7ee787org.meshtastic.core.common.util.ioDispatcher
Tff7b72import T7ee787org.meshtastic.core.database.entity.QuickChatAction
Tff7b72import T7ee787org.meshtastic.core.repository.QuickChatActionRepository
Tff7b72import T7ee787org.meshtastic.core.ui.viewmodel.safeLaunch
Tff7b72import T7ee787org.meshtastic.core.ui.viewmodel.stateInWhileSubscribed
Tf0883e@KoinViewModel
Tff7b72class T56d364QuickChatViewModelTb4b4b4(Tff7b72private Tff7b72val Te6edf3quickChatActionRepositoryTb4b4b4: Te6edf3QuickChatActionRepositoryTb4b4b4) Tb4b4b4: Te6edf3ViewModelTb4b4b4(Tb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3quickChatActions
Tff7b72getTb4b4b4(Tb4b4b4) Tff7b72= Te6edf3quickChatActionRepositoryTb4b4b4.Te6edf3getAllActionsTb4b4b4(Tb4b4b4)Tb4b4b4.Te6edf3stateInWhileSubscribedTb4b4b4(Te6edf3initialValue Tff7b72= Te6edf3emptyListTb4b4b4(Tb4b4b4)Tb4b4b4)
Tff7b72fun Td2a8ffupdateActionPositionsTb4b4b4(Te6edf3actionsTb4b4b4: Te6edf3ListTff7b72<Te6edf3QuickChatActionTff7b72>Tb4b4b4) Tb4b4b4{
Te6edf3safeLaunchTb4b4b4(Te6edf3context Tff7b72= Te6edf3ioDispatcherTb4b4b4, Te6edf3tag Tff7b72= Ta5d6ff"Ta5d6ffupdateActionPositionsTa5d6ff"Tb4b4b4) Tb4b4b4{
Tff7b72for Tb4b4b4(Te6edf3position Tff7b72in Te6edf3actionsTb4b4b4.Te6edf3indicesTb4b4b4) Tb4b4b4{
Te6edf3quickChatActionRepositoryTb4b4b4.Te6edf3setItemPositionTb4b4b4(Te6edf3actionsTff7b72[Te6edf3positionTff7b72]Tb4b4b4.Te6edf3uuidTb4b4b4, Te6edf3positionTb4b4b4)
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Tff7b72fun Td2a8ffaddQuickChatActionTb4b4b4(Te6edf3actionTb4b4b4: Te6edf3QuickChatActionTb4b4b4) Tff7b72=
Te6edf3safeLaunchTb4b4b4(Te6edf3context Tff7b72= Te6edf3ioDispatcherTb4b4b4, Te6edf3tag Tff7b72= Ta5d6ff"Ta5d6ffaddQuickChatActionTa5d6ff"Tb4b4b4) Tb4b4b4{ Te6edf3quickChatActionRepositoryTb4b4b4.Te6edf3upsertTb4b4b4(Te6edf3actionTb4b4b4) Tb4b4b4}
Tff7b72fun Td2a8ffdeleteQuickChatActionTb4b4b4(Te6edf3actionTb4b4b4: Te6edf3QuickChatActionTb4b4b4) Tff7b72=
Te6edf3safeLaunchTb4b4b4(Te6edf3context Tff7b72= Te6edf3ioDispatcherTb4b4b4, Te6edf3tag Tff7b72= Ta5d6ff"Ta5d6ffdeleteQuickChatActionTa5d6ff"Tb4b4b4) Tb4b4b4{ Te6edf3quickChatActionRepositoryTb4b4b4.Te6edf3deleteTb4b4b4(Te6edf3actionTb4b4b4) Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.1s